home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Aventura / Squeaky.swf / scripts / frame_290 / PlaceObject2_497_93 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2005-08-04  |  554 b   |  32 lines

  1. onClipEvent(enterFrame){
  2.    if(this._parent.hero.shape.hitTest(this))
  3.    {
  4.       this.gotoAndStop(2);
  5.    }
  6.    if(stop != "yes")
  7.    {
  8.       if(xmov > 0)
  9.       {
  10.          if(this._x < xhome + distance)
  11.          {
  12.             this._x += xmov;
  13.          }
  14.          else
  15.          {
  16.             xmov = - xmov;
  17.          }
  18.       }
  19.       else if(xmov < 0)
  20.       {
  21.          if(this._x > xhome - distance)
  22.          {
  23.             this._x += xmov;
  24.          }
  25.          else
  26.          {
  27.             xmov = - xmov;
  28.          }
  29.       }
  30.    }
  31. }
  32.